<%@ page language="java" contentType="text/html; charset=utf-8"
    pageEncoding="utf-8"%>
    <%@ page import="java.io.*,java.util.*,java.sql.*"%>
<%@ page import="javax.servlet.http.*,javax.servlet.*"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql"%> 
<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<meta http-equiv="X-UA-Compatible" content="IE=edge">
		<title></title>
		<link rel="stylesheet" href="../assets/css/layui.css">
	    <link rel="stylesheet" href="../assets/css/view.css"/>
	    <link rel="stylesheet" href="../assets/css/style.css"/>
	</head>
	<body class="layui-tank">
	
	<sql:setDataSource var="snapshot" driver="com.mysql.cj.jdbc.Driver"
 url="jdbc:mysql://localhost:3306/equipmentmgr?useSSL=false&serverTimezone=Asia/Shanghai&allowPublicKeyRetrieval=true"
 user="root" password="123456" />
		 <div class="layui-card">
		 <div class="mblf layui-col-xs6 layui-col-md6">
    			 <i class="layui-icon">&#xe656;</i>
    			 <p>维修信息管理 > <span><a href="fixM.jsp">维修分配</a></span></p>
    		</div> 
		 	   <form class="layui-form" action="">
				   <div class="layui-form-item">
					    <label class="layui-form-label">报修单号</label>
					    <div class="layui-input-block">
					       <p>${param.id}</p>
					    </div>					    
					</div>
					<div class="layui-form-item">
					    <label class="layui-form-label">设备名称</label>
					    <div class="layui-input-block">
					        <p>${param.name}</p>
					    </div>					    
					</div>
					<div class="layui-form-item layui-form-text">
					    <label class="layui-form-label">报修人</label>
					    <div class="layui-input-block">
					     <sql:query dataSource="${snapshot}" var="repoman">
                                  SELECT  * FROM `d_user` where id = ${param.pep}
                             </sql:query>
                             <c:forEach var="row2" items="${repoman.rows}">
						      <c:out value="${row2.nickname}"/>
						      </c:forEach>
					       
					    </div>
					</div>
					<div class="layui-form-item layui-form-text">
					    <div class="layui-form-item">
							    <label class="layui-form-label">维修人员</label>
							    <div class="layui-input-block">
							     
								 	  <sql:query dataSource="${snapshot}" var="role">
                                            SELECT  *  FROM `d_role` where TYPE='2'
                                      </sql:query>
								 	<select name="interest" lay-filter="aihao">
								 	<c:forEach var="fix" items="${role.rows}">
					    
					                 <sql:query dataSource="${snapshot}" var="user">
                                       SELECT  * FROM `d_user` where USER_ROLE=${fix.ID}
                                      </sql:query>
					   	              <c:forEach var="fixman" items="${user.rows}">

								 	<option value="${fixman.id}"><c:out value="${fixman.nickname}"/></option>
								 	</c:forEach>>
						            </c:forEach>
								 	</select>					    
								  
							    </div>						    
						  </div>
					    
					</div>
					
				</form>				
		 </div>
		 <div class=" tkbtnfxd">
	    	<button type="button" class="layui-btn  layui-btn-normal float-right">确定分配</button>
	        <button type="button" class="layui-btn layui-btn-primary float-right">取消</button>
	    </div>
	    
	<script src="../assets/layui.all.js"></script>    
	
	</body>
</html>
